package com.haredot.mapper;

import com.haredot.dto.UserAdminDTO;
import com.haredot.entity.Organization;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface OrganizationMapper {
    Organization findOrgByName(String name);

    Organization findOrgByCode(String code);

    int insert(Organization organization);

    int update(Organization organization);

    List<Organization> findAll();

    int updateChildrenStateForbidden(Long id);

    int deleteSelfAndChildrenOrgBySelfId(Long id);

    Organization findOrgById(Long pid);

    List<UserAdminDTO> findUsersByOrgId(Long orgId);
}